<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
|  用户端 需要鉴权 API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//上传头像
Route::post('upload_avatar', [\App\Http\Controllers\Api\UserController::class, 'uploadAvatar']);

//用户相关
Route::prefix('user')->group(function () {
    //用户注销
    Route::post('cancel_user', [\App\Http\Controllers\Api\UserController::class, 'cancelUser']);
    //修改登录密码
    Route::post('edit_password', [\App\Http\Controllers\Api\UserController::class, 'editPassword']);
    //获取设置里的我的个人信息
    Route::get('get_user_details', [\App\Http\Controllers\Api\UserController::class, 'getUserDetails']);
    //编辑个人信息
    Route::post('edit_user_info', [\App\Http\Controllers\Api\UserController::class, 'editUserInfo']);
    //获取我的信息+资产信息
    Route::get('get_user_info', [\App\Http\Controllers\Api\UserController::class, 'getUserInfo']);
    //用户积分流水
    Route::get('my_mt_Log', [\App\Http\Controllers\Api\UserController::class, 'myMtLog']);
    //余额流水
    Route::get('my_at_Log', [\App\Http\Controllers\Api\UserController::class, 'myAtLog']);
});

